package com.example.seata.stock.controller;


import com.example.seata.stock.entity.StorageTbl;
import com.example.seata.stock.service.IStorageTblService;
import org.example.common.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author tianshuo
 * @since 2021-05-15
 */
@RestController
@RequestMapping("/stock")
public class StorageTblController {

    @Autowired
    private IStorageTblService storageTblService;

    @PostMapping("/deduct")
    public String deduct(@RequestBody StorageTbl storageTbl) {
        storageTblService.deduct(storageTbl);
        return "ok";
    }
}

